﻿using System;
using System.Windows.Media;
using Framework.Attributes;
using Framework.Model;

namespace CharacterModel
{
    [Serializable]
    public class LayerSvgPath : IId
    {
        public int Id { get; set; }
        public string SvgPath { get; set; }

        private PathGeometry _path;

        [Exclude]
        public PathGeometry Path
        {
            get
            {
                return PathGeometry.CreateFromGeometry(Geometry.Parse(SvgPath));
            }
            set
            {
                _path = value;
                SvgPath = _path.ToString();
            }
        }
    }
}